# -*- coding: utf-8 -*-
from common.helper import Helper
from db.mysql import MysqlClient
import json
class Arrangement( object ):
    def __init__(self):
        self.mysql = MysqlClient()
        self.name = "盛放人生——全球癌症医疗保险"

    # 拉取数据
    def pullData(self, data={}):
        for item in Helper.selectData(self.name, self.mysql):
            data["name"] = self.name
            data["company"] = "安盛保险"
            data["year"] = item["year"]
            data["gender"] = item["gender"]
            data["money"] = "300w"
            data["expire"] = item["expire"]
            data["payType"] = "年缴"
            data["plan"] = json.loads( item["introduce"])["plan"]
            data["price"] = item["price"]
            Helper.mergeTable(self.name, self.mysql, data)